<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="documentation.css" />
	<title>Dauphin</title> 
</head>
<body>
<h1>Dauphin</h1> <h2>Drop-in front end to MySQL databases.</h2> 
<h3>Introduction | <a href="tutorial.html">Tutorial</a> </h3> 
<dl>
	<dt>
		What is Dauphin? 
	</dt>
	<dd>
		It's a Perl module and a set of HTML template files which allow you to quickly get access to view, create, edit and delete records in a MySQL database. 
	</dd>
	<dt>
		How does it work? 
	</dt>
	<dd>
		You should be able to download Dauphin, edit just a few parameters in two files and be up and running. 
	</dd>
	<dt>
		What does it require? 
	</dt>
	<dd>
		A MySQL database, perl, and the perl modules CGI, HTML::Template and DBI. 
	</dd>
</dl>
<h3>Installation</h3> 
<p>
	If you download all the files and put them somewhere on a web server then edit two files: 
</p>
<ul>
	<li>
		database_config.cgi 
	</li>
	<li>
		your-table.cgi 
	</li>
</ul>
<p>
	it should Just Work. The  <strong>database_config.cgi</strong> file contains the name of the database, the username and password. The <strong>your-table.cgi</strong> will do everything else, once you've made it executable. 
</p>
 <h3>Advanced Features</h3> 
<p>
	Dauphin, as well as directly accessing a database table, can handle relationships with other tables in two ways: 
</p>
<ul>
	<li>
		<em>lookups</em> (where a value is looked up directly in a second table) 
	</li>
	<li>
		<em>links </em>(where a value is retrieved from another table using a join with an intermediary table) 
	</li>
</ul>
<h4>Example of a Dauphin <em>lookup</em>:</h4> 
<ul>
	<li>
		You have a table of people in which the state where they live is represented by a number: <em>1=Alabama, 2=Alaska,</em> etc. 
	</li>
	<li>
		You have another table of states where those numbers can be looked up 
	</li>
	<li>
		You define the state field as a <em>lookup</em> in your <code>Dauphin-&gt;new()</code> call 
	</li>
	<li>
		The value is now retrieved from the remote field when you view a record 
	</li>
	<li>
		You now have access to the table of states as a select menu when editing. 
	</li>
</ul>
<h4>Example of a Dauphin <em>link</em>:</h4> 
<ul>
	<li>
		You have a table of people, identified by a unique ID: <em>1=Jane Smith;2=Maria Lopez,</em> etc. 
	</li>
	<li>
		You have a table of academic degrees also with a unique ID:<em> 1=BA;2=MA,</em> etc. 
	</li>
	<li>
		You have a third <em>joining table</em> which lists which of your people have which degrees
	<li>
		You define the relationship as a <em>link</em> in your <code>Dauphin-&gt;new()</code> call 
	</li>
	<li>
		The values are now retrieved from the remote table when you view a record 
	</li>
	<li>
		You now have access to the "who has which degree" table via checkboxes when editing. 
	</li>
</ul>
<h3>Limitations</h3> 
<ul>
	<li>
		Doesn't do database admin tasks, only editing data in existing database tables
	</li>
	<li>
		Doesn't do authentication (security is up to you: add it to the cgi file which calls Dauphin, or protect the folder) 
	</li>
	<li>
		Doesn't validate input (although you can easily add client-side validation to the templates) 
	</li>
</ul>
</body>
</html>
